Skip to main content
POST
/
action
/
heygen_photo_avatar_create_avatar_action
[PA1] Create Photo Avatar
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/heygen_photo_avatar_create_avatar_action \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_type": "generate",
  "output_variable_name": "avatar_result",
  "name": "<string>",
  "photos_json": "<string>",
  "age": "Young Adult",
  "gender": "Unspecified",
  "ethnicity": "Unspecified",
  "orientation": "square",
  "pose": "half_body",
  "style": "Realistic",
  "appearance": "<string>"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
source_type
enum<string>
default:generate
required

How to create the avatar.

Available options:
upload,
generate
output_variable_name
string
default:avatar_result
required

Variable name for the result. Access as {{avatar_result.group_id}}, {{avatar_result.status}}.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
name
string

Display name for the avatar (default: My Avatar).

photos_json
string

JSON array of photo objects: [{"base64": "...", "mimeType": "image/jpeg"}]. Required for upload mode.

age
enum<string>
default:Young Adult

Age range for generated avatar.

Available options:
Young Adult,
Middle-Aged,
Senior
gender
enum<string>
default:Unspecified
Available options:
Unspecified,
Male,
Female,
Non-Binary
ethnicity
enum<string>
default:Unspecified
Available options:
Unspecified,
Asian,
Black,
Caucasian,
Hispanic,
Middle Eastern,
Mixed
orientation
enum<string>
default:square
Available options:
square,
portrait,
landscape
pose
enum<string>
default:half_body
Available options:
half_body,
close_up,
full_body
style
enum<string>
default:Realistic
Available options:
Realistic,
Artistic,
Professional
appearance
string

Optional description of desired appearance traits.

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action